#ifndef POLYGON_H
#define POLYGON_H
class polygon
{
protected:
    double side_length_;

public:
    polygon()
        : side_length_(-1) {}
    virtual ~polygon() {}
    void set_side_length(double side_length)
    {
        side_length_ = side_length;
    }
    virtual double area() const = 0;
};
// the types of the class factories
typedef polygon *create_t();
typedef void destroy_t(polygon *);
#endif // POLYGON_H